//
//  NetworkMessageCreator.h
//  iphone-client
//
//  Created by Sebastian Borggrewe on 14/12/2011.
//  Copyright (c) 2011 Robolo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NetworkMessage.h"

@interface NetworkMessageCreator : NSObject

+ (NetworkMessage *) disconnectMessage;

+ (NetworkMessage *) loginMessageWith:(NSString *)myName 
                                 role:(NSInteger)myRole 
                                 team:(NSInteger)teamID;

+ (NetworkMessage *) loginReplyMessageRefID:(NSInteger)refID 
                                    success:(BOOL)success;

+ (NetworkMessage *) logoutMessage;

+ (NetworkMessage *) logoutReplyMessageRefID:(NSInteger)refID 
                                     success:(BOOL)success;

+ (NetworkMessage *) locationMessageWithLatitude:(double)latitude
                                       longitude:(double)longitude 
										accuracy:(double)accuracy;

+ (NetworkMessage *) runnerKeyframeMessageWithTargetLongitude:(double)target_latitude 
                                              targetLatitude:(double)target_longitude 
                                                targetPoints:(NSInteger)target_points 
                                                   teamMoney:(NSInteger)team_money 
                                                  teamPoints:(NSInteger)team_points
                                              allowedToCatch:(bool)allowed_to_catch
                                              carryingPoints:(int)carrying_points 
                                                      caught:(bool)caught
                                               baseLongitude:(double)base_latitude 
                                                baseLatitude:(double)base_longitude 
                                                  nearbyBase:(bool)nearby_base;

+ (NetworkMessage *) hunterKeyframeMessageWithTargetLongitude:(double)target_latitude 
                                              targetLatitude:(double)target_longitude 
                                                targetPoints:(NSInteger)target_points 
                                                   teamMoney:(NSInteger)team_money 
                                                  teamPoints:(NSInteger)team_points
                                              allowedToCatch:(bool)allowed_to_catch;

+ (NetworkMessage *) operatorKeyframeMessageWithTeams:(NSMutableDictionary*)teams 
                                         checkpoints:(NSMutableDictionary*)checkpoints;

//catching messages

+ (NetworkMessage *) allowCatchMessage;

+ (NetworkMessage *) disallowCatchMessage;

+ (NetworkMessage *) catchStartMessageWithRefID:(NSInteger)refID;

+ (NetworkMessage *) beingCaughtMessage;

+ (NetworkMessage *) catchEndMessage;

+ (NetworkMessage *) caughtMessage;

+ (NetworkMessage *) freeMessage;

+ (NetworkMessage *) catchMessage;

+ (NetworkMessage *) stopCatchMessage;

// operator functions
+ (NetworkMessage *) assignMessageWithHunter:(NSString*)hunterID
                                      Runner:(NSString*)runnerID
                                      Assign:(BOOL)assign;

+ (NetworkMessage *) assignMessageWithRunner:(NSString*)runnerID
                                  Checkpoint:(NSString*)checkpointID
                                      Assign:(BOOL)assign;

+ (NetworkMessage *) assignNotifyMessageWithTargetLatitude:(double)latitude 
                                                 longitude:(double)longitude
                                                    points:(int)points
                                                    assign:(bool)assign;

//message for bringing home points
+ (NetworkMessage *) allowBringHomeMessage;

+ (NetworkMessage *) disallowBringHomeMessage;

+ (NetworkMessage *) bringHomeMessage;

+ (NetworkMessage *) bringHomeOKMessageWithOK:(bool)ok
                                        refid:(NSInteger)refid;

@end
